package com.example.mybatisplusdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mybatisplusdemo.model.domain.OrderItem;
import com.example.mybatisplusdemo.model.dto.OrderProductQuantityDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品与订单关联详情 Mapper 接口
 * </p>
 *
 * @author lqj
 * @since 2025-07-02
 */
public interface OrderItemMapper extends BaseMapper<OrderItem> {

    List<OrderItem> selectByOrderId(Long orderId);

    // mapper/OrderProductMapper.java
    List<OrderProductQuantityDTO> selectProductQuantitiesByOrderId(@Param("orderId") Long orderId);

}
